/*
     Copyright (C) 2011 Benny Mackney

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef PARTICLE_H
#define PARTICLE_H

#include "bennysc.h"
#include "Box.h"
#include "Vec2D.h"


class Particle : public Box
{
    public:
        Particle();
        Particle(Sint16 X,Sint16 Y, double XVEL, double YVEL, int AGEDIE);
        Particle(Sint16 X,Sint16 Y, double XVEL, double YVEL, double XACC, double YACC, int AGEDIE);
        Particle(Vec2D POS, Vec2D VEL, int AGEDIE);
        Particle(Vec2D POS, Vec2D VEL, Vec2D ACC, int AGEDIE);
        virtual ~Particle();
        void set_vel(int XVEL, int YVEL);
        void set_acceleration(double XACC,double YACC);
        void tick();
        bool dead();
        SDL_Surface* sprite;
        void set_colourmode(bool mode);
        void set_startcolour(SDL_Colour* colour);
        void set_endcolour(SDL_Colour* colour);
    private:
        Vec2D velocity;
        Vec2D acceleration;
        Vec2D position;
        int age;
        int ageDie;
        bool colourmode;
        SDL_Colour* endColour;
        SDL_Colour* startColour;
};

#endif // PARTICLE_H
